home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Advanced M247288152001.psc / code.txt < prev    next >
Encoding:
Text File  |  2000-02-16  |  5.1 KB  |  161 lines

  1. T H E   P R O J E C T
  2.  
  3. *** BulkDump_proj.vbp
  4. The main objective of this program was to analyse SC-55 bulk
  5. dumps and generate smaller alternatives for those dumps.
  6.  
  7. A bulkdump containes 7360 nibblized bytes of data. Nibblizing
  8. is often used in midi communication, since midi uses only
  9. 7bit (0-127) 'lines'. When you want to transmit a value higher than
  10. 127 then there is a problem. Nibblizing is the solution, 
  11. altough it doubles the amount of data. For instance, if you
  12. want to transmit &HD8 (216), you have to split it into
  13. &H0D , &H08 and send those 2 bytes.
  14. After un-nibblizing the dump data the number of bytes is
  15. 3680. Since I am not able yet to record a midi dump, I extract
  16. these dump data bytes from a *.mid file. The user has to
  17. record his dumps elsewhere and then load it into the program.
  18. In the code the data are put in the array:
  19. Public dmpB(3680) As Byte.
  20.  
  21. Whenever the user edites one of the parameter values (mixer forms)
  22. it will alter the current opened dump value. After editing he can
  23. save the new dump values, or generate alternatives.
  24. The 'Alternatives' function looks for non-default values. If only a
  25. few are found, the resulting alternative will be much, much smaller
  26. in size. A saved dumps size is about 8kB or 2 to 4 bars in the
  27. piece of music. The alternative can be less than 1kB, 1 bar.
  28.  
  29. THE DUMPS
  30. The information in the Sound Canvas manual about dumps is summiere,
  31. to say the least.
  32. Everything is transmitted in packets. The largest possible size
  33. of a packet is 128 bytes. There are 64 patch common bytes,
  34. 112 x 16 patch part bytes, 128 x 2 drum map parameters.
  35.     64 + (112 * 16) + 256 = 2112 bytes
  36. This is what they say, but this is much less than 3680. Why?
  37. When I analysed recorded dumps in midi files I found the 
  38. following structure:
  39.  
  40.    29 full part packets of 141 bytes (128 data bytes + 13 other)
  41.     1 non-full part packet of 29 (16 data bytes + 12 other)
  42.    14 full drum packets
  43.     1 non-full drum packet of 36 (24 data bytes + 12 other)
  44.    14 full drum packets
  45.     1 non-full drum packet of 36 (24 data bytes + 12 other)
  46.  
  47.    full packet = 1 DeltaTime byte
  48.                  1 BOX byte - &HF0
  49.                  2 following bytes size 137 Big Endian - &H81, &H9
  50.                  3 modelbytes - &H41, &H10, &H42
  51.                  1 DT1 (data set 1) byte - &H12
  52.                  3 address bytes - &H480000 patch all /&H490000 drum map
  53.                128 packet data bytes
  54.                  1 checksum byte
  55.                  1 EOX byte - &HF7
  56.              = 141 bytes
  57.  
  58. If you look at the data bytes only, you can calculate:
  59.     (29 + 28) * 128 + 16 + 48 = 7360 nibblized
  60.                   = 3680 bytes
  61.  
  62.  T H E  F O R M S 
  63.  
  64. *** frmAbout 
  65. Generated by VB5
  66.  
  67. *** frmAltOpt
  68. This form allows the user to set some options regarding to how
  69. the alternatives for the dump should be generated
  70.  
  71. *** frmBD
  72. This is the main startup form, with menu's. The menu's are explained
  73. in BulkDump.htm
  74.  
  75. *** frmBDp
  76. This form is a kind of a WYSYWYG preview to print the dump data.
  77.  
  78. *** frmDevCap
  79. This form enumerates the midi devices and lets the user choose
  80. one of them, suggesting the MPU-401 ports
  81.  
  82. *** frmMixA
  83. A form for editing ALL or COMMON parameters, such as reverb and chorus
  84. macro.
  85. This form is independant of the data in sc55par.dat
  86.           is easy to extract from the project
  87.  
  88. *** frmMixLong
  89. This form mainly offers the possibility to generate *.SYX files for
  90. separate individual system exclusive messages.
  91.  
  92. *** frmMixP
  93. A form for editing PART parameters.
  94. This form is independant of the data in sc55par.dat
  95.           is easy to extract from the project
  96.  
  97. *** frmReadMidi
  98. Since reading midi files can take a while, and sometimes the
  99. resulting text is larger then 64kB, this form offers the
  100. possibility of Canceling the action, viewing the progress
  101. and filtering the midi messages.
  102.  
  103. *** frmSeq
  104. This form generates fade in and outs in the form of *.mid files.
  105.  
  106.  T H E   M O D U L E S 
  107.  
  108. *** CD_File.bas
  109. Replaces the CommonDialog control.
  110.  
  111. *** divers.bas
  112. This module containes general functions.
  113.  
  114. *** dump.bas
  115. This module containes routines mostly specific to the sound canvas.
  116.  
  117. *** midi.bas
  118. This module containes all midi API function and my own midi function
  119. non specific to the sound canvas.
  120.  
  121.  O T H E R   F I L E S
  122.         
  123. *** sc55par.dat
  124.  
  125.     [MODULEINFO]
  126.     ManuID = 41    Roland
  127.     DeviceID = 10    Device ID
  128.     ModelID = 42    GS standard
  129.  
  130.     [SHORTMSG] - list of short messages
  131.     01 Bn 00 mm Bn 20 00    bank select    ->No/ShortMsg bytes (mm=value)/name
  132.  
  133.     [PARTYPES] - list of parameter types
  134.     01  1   28   58    -24    +24 semitones ->No/NumBytes/MinHex/MaxHex/MinDec/MaxDec/name
  135.  
  136.     [COMMON] - common parameters
  137.     000 MAS TUN   0 400000  9 04 00 Master tune ->No/ShortName/ByteOffs/Address/ParType/Altern.SHORTMSG/name
  138.  
  139.     [PARTS] ->same as common
  140.  
  141. Don't change anything in this file unless you know what you are doing.
  142.  
  143. *** BulkDump.htm
  144. Is a short help file for the user.
  145.  
  146. *** sysex.htm
  147. My own questions directed to you, the reader.
  148.  
  149. *** SC.gif
  150. Used in BulkDump.htm
  151.  
  152. *** midi.gif - anoteoff.gif
  153. Used in the program & BulkDump.htm
  154.  
  155. *** piano.ico
  156. The program's icon
  157.  
  158. GSall.mid
  159. A saved dump with default values.
  160.  
  161.